package com.yunqiao.service.api.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunqiao.common.utils.PageUtils;
import com.yunqiao.common.utils.Query;

import com.yunqiao.service.api.mapper.ArticleMapper;
import com.yunqiao.service.api.entity.ArticleEntity;
import com.yunqiao.service.api.ArticleService;


@Service("articleService")
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, ArticleEntity> implements ArticleService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        //各种查询条件的过滤,在此进行
        QueryWrapper<ArticleEntity> queryWrapper = new QueryWrapper<>();

        IPage<ArticleEntity> page = this.page(new Query<ArticleEntity>(params).getPage(),queryWrapper);
        return new PageUtils(page);
    }

}
